//
//  WordReadResultView.m
//  Learn
//
//  Created by chijianguo on 2024/4/10.
//  Copyright © 2024 迟建国. All rights reserved.
//

#import "WordReadResultView.h"

@implementation WordReadResultView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    self.scoreLB = [[UILabel alloc] init];
    self.scoreLB.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:28];
    self.scoreLB.textColor = rgbHex(0x0cb76c, 1);
    self.scoreLB.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.scoreLB];
    [self.scoreLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(10);
        make.left.equalTo(self).offset(10);
        make.right.equalTo(self).offset(-10);
    }];
    
    self.imView = [[UIImageView alloc] init];
    self.imView.image = [UIImage imageNamed:@"score"];
    [self addSubview:self.imView];
    [self.imView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.scoreLB.mas_bottom).offset(10);
        make.centerX.mas_equalTo(self.mas_centerX);
        make.size.mas_equalTo(CGSizeMake(55, 12));
    }];

//    UILabel *wancheng = [[UILabel alloc] init];
//    wancheng.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:12];
//    wancheng.textColor = rgbHex(0x8e8e8e, 1);
//    wancheng.textAlignment = NSTextAlignmentCenter;
//    wancheng.text = @"完整度";
//    [self addSubview:wancheng];
//    [wancheng mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(self.imView.mas_bottom).offset(10);
//        make.centerX.mas_equalTo(self.mas_centerX);
//        make.right.equalTo(self).offset(-10);
//    }];
    self.wanchengLB = [[UILabel alloc] init];
    self.wanchengLB.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:12];
    self.wanchengLB.textColor = rgbHex(0x0cb76c, 1);
    self.wanchengLB.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.wanchengLB];
    [self.wanchengLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.imView.mas_bottom).offset(10);
        make.left.equalTo(self).offset(10);
        make.right.equalTo(self).offset(-10);
    }];

//    UILabel *liuli = [[UILabel alloc] init];
//    liuli.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:12];
//    liuli.textColor = rgbHex(0x8e8e8e, 1);
//    liuli.text = @"流利度";
//    liuli.textAlignment = NSTextAlignmentCenter;
//    [self addSubview:liuli];
//    [liuli mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(self).offset(10);
//        make.left.equalTo(self).offset(10);
//        make.right.equalTo(self).offset(-10);
//    }];

    self.liuliLB = [[UILabel alloc] init];
    self.liuliLB.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:12];
    self.liuliLB.textColor = rgbHex(0x0cb76c, 1);
    self.liuliLB.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.liuliLB];
    [self.liuliLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.wanchengLB.mas_bottom).offset(10);
        make.left.equalTo(self).offset(10);
        make.right.equalTo(self).offset(-10);
    }];
    
//    UILabel *zhunque = [[UILabel alloc] init];
//    zhunque.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:12];
//    zhunque.textColor = rgbHex(0x8e8e8e, 1);
//    zhunque.text = @"准确度";
//    zhunque.textAlignment = NSTextAlignmentCenter;
//    [self addSubview:zhunque];
//    [zhunque mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(self).offset(10);
//        make.left.equalTo(self).offset(10);
//        make.right.equalTo(self).offset(-10);
//    }];

    self.zhunqueLB = [[UILabel alloc] init];
    self.zhunqueLB.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:12];
    self.zhunqueLB.textColor = rgbHex(0x0cb76c, 1);
    self.zhunqueLB.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.zhunqueLB];
    [self.zhunqueLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.liuliLB.mas_bottom).offset(10);
        make.left.equalTo(self).offset(10);
        make.right.equalTo(self).offset(-10);
    }];

}



@end
